package com.minatest.server;

import org.apache.mina.core.service.IoHandlerAdapter;
import org.apache.mina.core.session.IoSession;

public class SeverHandler extends IoHandlerAdapter {

    @Override
    public void messageReceived(IoSession session, Object message)
            throws Exception {
        int key = 0;
        if(message instanceof String){
            key = Integer.valueOf(message.toString());
        }
        switch (key) {
        case 0x00000001:
            System.out.println("登陆命令！");
            break;
        default:
            System.out.println("错误命令！");
            break;
        }
    }
    
}
